#ifndef HOSPITAL_H
#define HOSPITAL_H

#include <QWidget>
#include <QMouseEvent>
#include <QMessageBox>
#include "dboperator.h"
#include "widget.h"

namespace Ui {
class Hospital;
}

class Hospital : public QWidget
{
    Q_OBJECT

public:
    explicit Hospital(QWidget *parent, int id);
    ~Hospital();

    void closeEvent(QCloseEvent *);

    void mousePressEvent(QMouseEvent*);

    void init_Pokemon_Msg();

signals:
    ExitHospital();     // 关闭信号槽

private slots:

    void on_upstair_clicked();

    void communicate_act();   // 显示对话框

    void on_cure_clicked();

    void on_closebutton_clicked();

    void on_pokemon_clicked();

private:
    Ui::Hospital *ui;

    bool canOpen;   // 控制权限
    bool upStair;   // 上楼状态
    bool action;    // 对话框开启状态
    int order;   // 记录播放内容
    QString content[4] = {"Tips:",
                          "这里是宠物医院，在这里可以治疗受伤的宠物✨。",
                          "点击屏幕任意处继续",
                          "点击恢复箱为所有受伤的宠物治疗😘"};    // 文本内容
    void set_canOpen();
    int id;

    DbOperator* dbase;
    container trainerMsg;
    QVector<pokemon> pokemonMsg;   // 包含玩家所有拥有的宝可梦的信息
    Widget* pokemonSurface;
};

#endif // HOSPITAL_H
